package io.gitee.kotle.demo.mvvm_demo.websocket

import android.view.View
import io.gitee.kotle.android.adapter.RecyclerViewHolder
import io.gitee.kotle.android.adapter.recyclerViewAdapter
import io.gitee.kotle.demo.databinding.HolderWebSocketReceiveBinding

class WebSocketReceiveHolder :
    RecyclerViewHolder<WebSocketReceiveHolder.Bean, HolderWebSocketReceiveBinding> {
    companion object {
        fun createAdapter() = recyclerViewAdapter(WebSocketReceiveHolder::class.java)
    }

    class Bean(val text: String)

    constructor(binding: HolderWebSocketReceiveBinding) : super(binding)
    constructor(itemView: View) : super(itemView)

    override fun bindData(data: Bean) {
        mBinding.text.text = data.text
    }
}